﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CSConsoleTest
{
    class TestCTS : BaseConsoleTest
    {
        public void printDescription()
        {
            Console.WriteLine("--- CTS(Common Type System) ---");
        }

        public void doTest()
        {
            byte byteValue = 1;                 // CTS : System.Byte
            sbyte sbyteValue = 1;               // CTS : System.SByte
            short shortValue = 1;               // CTS : System.Int16
            int intValue = 1;                   // CTS : System.Int32
            long longValue = 1;                 // CTS : System.Int64
            ushort ushortValue = 1;             // CTS : System.Uint16
            uint uintValue = 1;                 // CTS : System.UInt32
            ulong ulongValue = 1;               // CTS : System.Uint64
            float floatValue = 1;               // CTS : System.Single
            double doubleValue = 1;             // CTS : System.Double
            bool boolValue = true;              // CTS : System.Boolean
            char charValue = 'a';               // CTS : System.Char
            decimal decimalValue = 1;           // CTS : System.Decimal
            //-                                 // CTS : System.IntPtr
            //-                                 // CTS : System.UIntPtr
            object objectValue = new object();  // CTS : System.Object
            string stringValue = "1";           // CTS : System.string


            Console.WriteLine("byteValue : CTS Type: {0} Min: {1} Max: {2}", sbyteValue.GetType(), byte.MinValue, byte.MaxValue);
            Console.WriteLine("sbyteValue : CTS Type: {0} Min: {1} Max: {2}", byteValue.GetType(), sbyte.MinValue, sbyte.MaxValue);
            Console.WriteLine("shortValue : CTS Type: {0} Min: {1} Max: {2}", shortValue.GetType(), short.MinValue, short.MaxValue);
            Console.WriteLine("intValue : CTS Type: {0} Min: {1} Max: {2}", intValue.GetType(), int.MinValue, int.MaxValue);
            Console.WriteLine("longValue : CTS Type: {0} Min: {1} Max: {2}", longValue.GetType(), long.MinValue, long.MaxValue);
            Console.WriteLine("ushortValue : CTS Type: {0} Min: {1} Max: {2}", ushortValue.GetType(), ushort.MinValue, ushort.MaxValue);
            Console.WriteLine("uintValue : CTS Type: {0} Min: {1} Max: {2}", uintValue.GetType(), uint.MinValue, uint.MaxValue);
            Console.WriteLine("ulongValue : CTS Type: {0} Min: {1} Max: {2}", ulongValue.GetType(), ulong.MinValue, ulong.MaxValue);
            Console.WriteLine("floatValue : CTS Type: {0} Min: {1} Max: {2}", floatValue.GetType(), float.MinValue, float.MaxValue);
            Console.WriteLine("doubleValue : CTS Type: {0} Min: {1} Max: {2}", doubleValue.GetType(), double.MinValue, double.MaxValue);
            Console.WriteLine("boolValue : CTS Type: {0}", boolValue.GetType());
            Console.WriteLine("charValue : CTS Type: {0} Min: {1} Max: {2}", charValue.GetType(), char.MinValue, char.MaxValue);
            Console.WriteLine("decimalValue : CTS Type: {0} Min: {1} Max: {2}", decimalValue.GetType(), byte.MinValue, byte.MaxValue);
            Console.WriteLine("objectValue : CTS Type: {0}", objectValue.GetType());
            Console.WriteLine("stringValue : CTS Type: {0}", stringValue.GetType());
        }
    }
}
